#include <iostream>

using namespace std;


int main()
{
	const int N = 20;
	int result = 0;
	int i;
	for(i=2*N;;i+=N)
	{
		int j=N-1;
		while(j>1 && i%j==0) j--;
		if(j<=1)
		{
			cout << i << endl;
			return 0;
		}
	}
}
